from . import views
from django.urls import path, re_path
from backend.views import UserView,imageCodeManage,login
from backend.views import StatisticsManage
from backend.views import alterpassword
from backend.views import validcode
from backend.views import getUserHistory_or_Collection
from backend.views import delUserHistory_or_Collection
from backend.views import getPriceTrend
from backend.views import PayUrlView,CreateOrder
urlpatterns = [
    path('', views.Index.as_view()),  # 主页
    path('tosearch/',views.ToSearchPage.as_view()), # 主页跳转到搜索页
    path('search/',views.Search.as_view()), # 输入框中搜索
    path('user/',UserView.as_view()),
    path('imageCode/',imageCodeManage),
    path('login/',login),
    path('statistics/',StatisticsManage),
    path('detail/',views.handleDetailPage),
    path('randomImage/',views.initImage),
    path('backend/',views.initBackendPage),
    path('imageupload/',views.imageUpload),
    path('alterpassword/',alterpassword),
    path('validcode/',validcode),
    path('userRecord/',getUserHistory_or_Collection),
    path('delUserRecord/',delUserHistory_or_Collection),
    path('priceTrend/',getPriceTrend),
    path('payment/',PayUrlView.as_view()),
    path('createOrder/',CreateOrder.as_view()),

    # re_path(r'^blogpage2/$', views.BlogPage2.as_view()),
    # re_path(r'^pagetemplate/$', views.pageTemplate),
    # path(r'stu/', views.Stuendt_View.as_view()),
    # path(r'stuByClass/', views.getStudentsByClassName),
]